package databases;

import java.sql.SQLException;

/**
 * Created by pc on 2016/7/17.
 */
public class OracleTest {

	public static void main(String args[]) throws ClassNotFoundException, SQLException {

	    /*
		Connection conn = null;
		Class.forName("oracle.jdbc.driver.OracleDriver");
		conn = DriverManager
				.getConnection("jdbc:oracle:thin:@202.66.128.140:1521:aidev", "aidatauser", "tiger");
		Statement stmt = conn.createStatement();
//		ResultSet rs = stmt.executeQuery("select * from  SPARK.WCG_USERS");
		ResultSet rs = stmt.executeQuery("select sysdate from  dual");
		while (rs.next()) {
			System.out.println(rs.getInt(1));
//			System.out.println(rs.getString("USERNAME"));
//			System.out.println(rs.getString("PASSWORD"));
			System.out.println("----------");
		}

		try {
			if (rs != null) {
				rs.close();
				rs = null;
			}
			if (stmt != null) {
				stmt.close();
				stmt = null;
			}
			if (conn != null) {
				conn.close();
				conn = null;
			}
		} catch (SQLException e) {
			e.printStackTrace();
		}

	*/
	}
}
